<?php
namespace App;

use Hyperf\Utils\ApplicationContext;

/**
 *
 */
class ObjectService
{
    private static $objectRegister = [
        'Redis'         => 'Hyperf\Redis\Redis',
    ];

    public static function getObject($objectName = null)
    {
        return !empty(self::$objectRegister[$objectName]) ? ApplicationContext::getContainer()->get(self::$objectRegister[$objectName]) : null;
    }
}
